import java.util.HashMap;
import java.util.Scanner;

public class Test1 {
    //找出字符串中第一个只出现一次的字符
    public static void find(String str){
        int value = 0;
        HashMap<Character,Integer> map = new HashMap<>();
        for (int i = 0; i < str.length(); i++) {
            if(map.containsKey(str.charAt(i))){
                value = map.get(str.charAt(i));
                map.put(str.charAt(i),value+1);
            }else{
                map.put(str.charAt(i),1);
            }
        }

        for (int i = 0; i < str.length(); i++) {

                if (map.get(str.charAt(i)) == 1) {
                    System.out.println(str.charAt(i));
                    break;
                }
            }
        }
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.print("请输入字符串：");
        while(scanner.hasNext()){
            String str = scanner.nextLine();
            find(str);
        }
    }
}
